package com.ruoyi.service.score.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.service.score.entity.CompanyScoreDetailEntity;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 公司评分明细表 Mapper 接口
 * </p>
 *
 * @author Zane
 * @since 2025-10-14
 */
public interface CompanyScoreDetailMapper extends BaseMapper<CompanyScoreDetailEntity> {

  /**
   * 获取公司评分平均分
   */
  @Select("select round(avg(score)) from t_company_score_detail where score_id = #{scoreId}")
  Integer getAvgScore(Long scoreId);
}
